package cn.wbnull.springbootdemo.io;

import java.util.ArrayList;
import java.util.List;

/**
 * 功能描述
 *
 * @author EDZ
 * @since 2022-09-05
 */
class test {
    public static void main(String[] args) {
        String ids = "1,23,4,5,6";
        String[] id = ids.split(",");
        List<String> list = new ArrayList<>();
        for (int ii = 0; ii < id.length; ii++) {
            list.add(id[ii]);
        }
        System.out.println(list.size());
        System.out.println(list.get(0));
        for (String str : list) {
            //也可以改写 for(int i=0;i<list.size();i++) 这种形式
            System.out.println(str);
        }

    }
}
